$('#rules').append('<%= escape_javascript( render(:partial => 'spree/admin/promotions/promotion_rule', :object => @promotion_rule) ) %>');
$('#rules .no-objects-found').hide();

$('.product_picker').productAutocomplete();
$('.user_picker').userAutocomplete();
$('.taxon_picker').taxonAutocomplete();

$('select.select2').select2({
  allowClear: true,
  dropdownAutoWidth: true,
  minimumResultsForSearch: 8
});

$('#promotion_rule_type').html('<%= escape_javascript options_for_promotion_rule_types(@promotion) %>');
$('#promotion_rule_type').select2();

